package org.zmhhxl.user.domain.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.zmhhxl.api.auth.domain.entity.Role;

import java.util.List;
import java.util.Optional;
import java.util.Set;

public interface RoleRepository extends JpaRepository<Role, Long> {
   Role findByRoleName(String roleName);

   Set<Role> findAllByIdIn(List<Long> roleIds);

   Optional<Role> findById(Long roleId);
}
